package com.itheima.health.dao;

import com.github.pagehelper.Page;
import com.itheima.health.pojo.User;
import org.apache.ibatis.annotations.Param;

/**
 * @author ：zhang
 * @date ：Created in 2019/11/20
 * @description ：用户DAO
 * @version: 1.0
 */
public interface UserDao {

    /**
     * 根据userName查询
     *
     * @param username
     * @return
     */
    User selectByUsername(@Param("username") String username);

    Page<User> selectByQueryString(@Param("queryString") String queryString);

    User selectUserById(Integer id);

    void insertUserIdAndRoleId(@Param("userId") Integer id, @Param("roleId") Integer roleId);

    void updateUser(User user);

    void deleteAll(Integer id);

    void insertUser(User user);

    void delete(Integer id);
}
